'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
#作者：cacho_37967865
#博客：https://blog.csdn.net/sinat_37967865
#文件：deal_dict.py
#日期：2019-12-03
#备注：本文主要介绍了python中dict集合的拆分、合并    
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


check_dict = {
    "0": 0, "1": 1, "2": 2, "3": 3, "4": 4, "5": 5, "6": 6, "7": 7, "8": 8, "9": 9,
    "A": 10, "B": 11, "C": 12, "D": 13, "E": 14, "F": 15, "G": 16, "H": 17, "J": 18, "K": 19, "L": 20, "M": 21,
    "N": 22, "P": 23, "Q": 24, "R": 25, "T": 26, "U": 27, "W": 28, "X": 29, "Y": 30
}


def create_dict(key_list,value_list):
    if len(key_list) == len(value_list):
        new_dict = {}
        for i in range(len(key_list)):
            new_dict[key_list[i]] = value_list [i]
        return new_dict
    else:
        print("keys与values不是一一匹配！")


def create_list(n,m,type):
    temp = []
    for i in range(n,m):
        if type=='num':
            temp.append(i)
        elif type == 'str':
            temp.append(str(i))
        elif type == 'alpha':
            temp.append(chr(i+87).upper())
    return temp


# 获取key值
def get_key(dict_list):
    for key in dict_list:
        print("遍历字典key+value值1：", key, dict_list[key])



if __name__ == '__main__':
    key_list = create_list(0,10,'str') + create_list(10,36,'alpha')
    value_list = create_list(0,36,'num')
    a = create_dict(key_list, value_list)
    print(a)

